package itheima.d02;

import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;

import java.util.List;

public class Test {
    public static void main(String[] args) throws DocumentException {
        SAXReader saxReader = new SAXReader();

        saxReader.read("D:\\javabasepro\\java AdvanceProject\\day12\\src\\itheima\\d02\\users.xml");

        Document document = saxReader.read("D:\\javabasepro\\java AdvanceProject\\day12\\src\\itheima\\d02\\users.xml");
        Element rootElement = document.getRootElement();
        System.out.println(rootElement.getName());
        List<Element> elements = rootElement.elements();
        elements.forEach(element -> {
            System.out.println(element.getName());
        });
    }
}
